home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 March
/
EnigmA AMIGA RUN 05 (1996)(G.R. Edizioni)(IT)[!][issue 1996-03][Skylink CD IV].iso
/
earcd
/
program
/
ixemlsrc.lha
/
ixemul
/
library
/
hwck.c
< prev
next >
Wrap
C/C++ Source or Header
|
1996-01-03
|
2KB
|
82 lines
/*
* This file is part of ixemul.library for the Amiga.
* Copyright (C) 1994 Rafael W. Luebbert
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Id: hwck.c,v 1.3 1994/10/18 09:12:51 rluebbert Exp $
*
* $Log: hwck.c,v $
* Revision 1.3 1994/10/18 09:12:51 rluebbert
* Check for math emulation code (881 || 882) in 040s. Assume no FPU otherwise.
* No 040 FPU instruction support yet.
*
* Revision 1.2 1994/06/22 14:56:04 rluebbert
* added struct ExecBase **4
*
* Revision 1.1 1994/06/19 15:11:39 rluebbert
* Initial revision
*
*/
#include <exec/execbase.h>
int check_hardware (void)
{
struct ExecBase *sysbase = *(struct ExecBase **)4;
#if defined (mc68020) || defined (mc68030) || defined (mc68040) || defined (mc68060)
if ((sysbase->AttnFlags & AFF_68020) || (sysbase->AttnFlags & AFF_68030) ||
(sysbase->AttnFlags & AFF_68040));
else
{
ix_panic("This ixemul version requires a 68020/30/40.");
return 0;
}
#endif
#ifdef __HAVE_68881__
if ((sysbase->AttnFlags & AFF_68881) || (sysbase->AttnFlags & AFF_68882))
;
else
{
if (sysbase->AttnFlags & AFF_68040)
ix_panic("68040 math emulation code not found.");
else
ix_panic("This ixemul version requires an FPU.");
return 0;
}
#endif
return 1;
}
int betterthan68000(void)
{
struct ExecBase *sysbase = *(struct ExecBase **)4;
if ((sysbase->AttnFlags & AFF_68020) || (sysbase->AttnFlags & AFF_68030) ||
(sysbase->AttnFlags & AFF_68040))
return 1;
return 0;
}
int gotanfpu(void)
{
struct ExecBase *sysbase = *(struct ExecBase **)4;
if ((sysbase->AttnFlags & AFF_68881) || (sysbase->AttnFlags & AFF_68882))
return 1;
return 0;
}